﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// WriteScript 的摘要说明
/// </summary>
/// 
namespace MyBind
{
    public class WriteScript:System.Web.UI.Page
    {
        public WriteScript()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
        }

        public static void Mesg(HttpResponse rsp,string news)
        {
            rsp.Write("<script type='text/javascript'>");
            rsp.Write("alert('"+news+"')");
            rsp.Write("</script>");
        }

        public static void ChangeLoca(HttpResponse rsp,string address)
        {
            rsp.Write("<script type='text/javascript'>");
            rsp.Write("window.location.href='" + address + "'");
            rsp.Write("</script>");
        }

        public static void openWind(HttpResponse rsp, string address,int w,int h)
        {
            rsp.Write("<script type='text/javascript'>");
            rsp.Write("window.open('" + address + "','','0,windth=" + w + ",height=" + h + "')");
            rsp.Write("</script>");
        }
    }
}